The present invention relates to an apparatus and concomitant method for optimizing the coding of motion video. More particularly, this invention relates to a method and apparatus that adaptively adjusts a quantizer scale for each macroblock within a frame to maintain the overall quality of the motion video while optimizing the coding rate.
The Moving Picture Experts Group (MPEG) created the ISO/IEC international Standards 11172 and 13818 (generally referred to as MPEG-1 and MPEG-2 format respectively) to establish a standard for coding/decoding strategies. Although these MPEG standards specify a general coding methodology and syntax for generating an MPEG compliant bitstream, many variations are permitted to accommodate a plurality of different applications and services such as desktop video publishing, video conferencing, digital storage media and television broadcast.
In the area of rate control, MPEG does not define a specific method for controlling the bit rate of an encoder. It is the task of the encoder designer to devise a rate control process for controlling the bit rate such that the decoder input buffer neither overflows nor underflows.
Currently, one way of controlling the bit rate is to alter the quantization process, which will affect the distortion of the input video image. By altering the quantizer scale (step size), the bit rate can be changed and controlled.
Although changing the quantizer scale is an effective method of implementing the rate control of an encoder, it has been shown that a poor rate control process will actually degrade the visual quality of the video image, i.e., failing to alter the quantizer scale in an efficient manner such that it is necessary to drastically alter the quantizer scale toward the end of a picture to avoid overflow and underflow conditions. Since altering the quantizer scale affects both image quality and compression efficiency, it is important for a rate control process to control the bit rate without sacrificing image quality.
In the current MPEG coding strategies (e.g., various MPEG test models), the quantizer scale for each frame is selected by assuming that all the pictures of the same type have identical complexity within a group of pictures. However, the quantizer scale selected by this criterion may not achieve optimal coding performance, since the complexity of each picture will vary with time.
Furthermore, encoders that utilize global-type transforms, e.g., wavelet transform (otherwise known as hierarchical subband decomposition), have similar problems. For example, wavelet transforms are applied to an important aspect of low bit rate image coding: the coding of a binary map (a wavelet tree) indicating the locations of the non-zero values, otherwise known as the significance map of the transform coefficients. Quantization and entropy coding are then used to achieve very low bit rates. It follows that a significant improvement in the proper selection of a quantizer scale for encoding the significance map (the wavelet tree) will translate into a significant improvement in compression efficiency and coding rate.
Furthermore, rate control can be implemented at lower levels within a frame e.g., at the macroblock or block levels. However, macroblock level rate control is generally more costly, since there is an additional overhead if quantization parameter (quantizer scale) is changed within a frame. Namely, more bits are needed to communicate to the decoder of the different quantizer scales for different macroblocks within each frame. This criticality is exacerbated in low bit rate applications, where proper bit management is very important.
Therefore, a need exists in the art for an apparatus and method that adaptively adjusts a quantizer scale for each macroblock within a frame to maintain the overall quality of the motion video while optimizing the coding rate.
The present invention is a method and apparatus for selecting a quantizer scale for each block, e.g., a macroblock, within each frame to maintain the overall quality of the video image while optimizing the coding rate. Namely, a quantizer scale is selected for each macroblock within each frame (picture) such that the target bit rate for the picture is achieved while maintaining a uniform visual quality over the entire frame.